﻿CREATE PROCEDURE dbo.SP_Members_Insert
	@Birthdate DateTime   =  NULL 
		, @ConfessionFather NChar (10)  =  NULL 
		, @CountryId Int   =  NULL 
		, @CreationDate DateTime   =  NULL 
		, @DisplayName NVarChar (256)  =  NULL 
		, @Email NVarChar (256)  =  NULL 
		, @FirstName NVarChar (256)  =  NULL 
		, @Gender TinyInt   =  NULL 
		, @ImagePath NVarChar (50)  =  NULL 
		, @IsActive Bit   =  NULL 
		, @LastName NVarChar (256)  =  NULL 
		, @LastUpdateDate DateTime   =  NULL 
		, @NationalityId Int   =  NULL 
		, @Password NVarChar (500)  =  NULL 
		AS
			INSERT INTO Members
			(
									Birthdate
												,ConfessionFather
												,CountryId
												,CreationDate
												,DisplayName
												,Email
												,FirstName
												,Gender
												,ImagePath
												,IsActive
												,LastName
												,LastUpdateDate
												,NationalityId
												,Password
									)
			Values(
									@Birthdate
												,@ConfessionFather
												,@CountryId
												,@CreationDate
												,@DisplayName
												,@Email
												,@FirstName
												,@Gender
												,@ImagePath
												,@IsActive
												,@LastName
												,@LastUpdateDate
												,@NationalityId
												,@Password
						)
			return @@identity